|
![](/i/fill.gif) |
"Thorsten Froehlich" wrote:
> You still did not understand which means I am not able
> to explain it well enough :-(
I still don't understand I'm afraid. In this one-line example:
#declare foo = function(C) {C*2}
C is not defined before the function. C *is* defined inside the function
{...} brackets. C is not defined after the function brackets. If that
doesn't mean that C is local to the function, then what does it mean?
> #declare foo = function(a,b,c)
> {
> a +
> #declare b = 5;
> c + b // What is 'b' now assuming either model of operation???
> }
>
> Currently the answer is: 'b' will be substituted by '5'
That's what I want too. Only if B is declared *before* the function it
shouldn't affect the function, like here:
> #declare b = 5;
> #declare foo = function(a,b,c)
> {
> a + c + b // What is 'b' now assuming either model of operation???
> }
> #declare q = foo(7,8,9)
In this example an error occurs, but I would like the b in the function to
be substituted with the b parameter fed to the function when it is invoked
(ie. 8), not the b variable declared before the function.
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
![](/i/fill.gif) |